package books4africa

class User extends SecUser{
	Date dateCreated

	String userType
	
	String fullName
	String address
	String city
	String country
	String schoolName
	String gradeLevel
	String phoneNumber
	String email

	static constraints = {
		userType(inList:['Teacher', 'Donor', 'Teacher & Donor', 'Admin'], blank:false)
		fullName(nullable:true)
		country(nullable:true)
		address(nullable:true)
		city(nullable:true)
		schoolName(nullable:true)
		gradeLevel(inList:['K', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', 'College'], nullable:true)
		phoneNumber(nullable:true)
		email(blank:false, email:true )
		
	}
	
	String toString(){
		"${fullName}"
	}
	
	static mapping = {
		tablePerHierarchy false

	}
}
